import type { CategoryTopItem } from '@/types/category'
import { http } from '@/utils/http'

/**
 * 分类列表-小程序
 */
export const getCategoryTopAPI = () => {
  return new Promise((resolve, _) => {
    setTimeout(() => {
      resolve({
        result: [{
          id: '1005000',
          name: '小程序',
          children: [{
            id: '1005999003',
            name: '商城',
            goods: [{
              id: '3995885',
              name: '快速商城框架(小程序/H5)',
              desc: '商城快速搭建',
              price: 6480.00,
              picture: 'https://www.alphabot.center/content/images/demo/prod-shop01.jpg',
            }]
          }, {
            id: '1005999004',
            name: '社交/任务',
            goods: [{
              id: '3995885',
              name: '社交广场类应用(小程序/H5)',
              desc: '社交/广场/任务发布',
              price: 9072.00,
              picture: 'https://www.alphabot.center/content/images/demo/prod-task01.jpg',
            }]
          }]
        }, {
          id: '1008017',
          name: '桌面系统',
          children: [{
            id: '1005999003',
            name: 'CMS人员管理',
            goods: [{
              id: '3995885',
              name: 'CMS人员管理(桌面版)',
              desc: '',
              price: 3960.00,
              picture: 'https://www.alphabot.center/content/images/demo/prod-employee01.jpg',
            }]
          }, {
            id: '1005999003',
            name: '管理系统定制',
            goods: [{
              id: '3995885',
              name: '管理系统定制(桌面版)',
              desc: '',
              price: 7920.00,
              picture: 'https://www.alphabot.center/content/images/demo/prod-shipping01.jpg',
            }]
          }]
        }]
      })
    }, 1200);
  })
  // return http<CategoryTopItem[]>({
  //   method: 'GET',
  //   url: '/category/top',
  // })
}
